/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * 添加收藏
 */
function addBookmark(title){
    var url = parent.location.href;
    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(title, url,"");
    } else if(document.all) { // IE Favorite
        window.external.AddFavorite( url, title);
    } else if(window.opera) { // Opera 7+
        return false; // do nothing
    } else { 
         alert('请按 Ctrl + D 为Chrome浏览器添加书签!');
    }
}
function getCookie(name){
	var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");if(arr=document.cookie.match(reg)){return unescape(decodeURI(arr[2]));}else{return "";}
}


function isMobile(){
	var ua=navigator.userAgent.toLowerCase();
	if (ua.indexOf('iphone') != -1)return "iphone";
	if (ua.indexOf('ipod') != -1)return "ipod";
	if (ua.indexOf('ipad') != -1) return "ipad";
	if (ua.indexOf('android') != -1) return "android";
	return false;
}
